package cn.edu.xmu.oomall.aftersales.microservice;

import cn.edu.xmu.oomall.aftersales.microservice.vo.OrderInfoVo;
import cn.edu.xmu.oomall.aftersales.microservice.vo.OrderItemRetVo;
import cn.edu.xmu.privilegegateway.annotation.util.InternalReturnObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @author Jiawei Zheng
 * @date 2021-12-11
 */
@FeignClient(name="order-service")
public interface OrderService {

    /**
     * 根据orderitemId获得订单明细详细信息
     * @param id
     * @return
     */
    @GetMapping("/internal/orderitem/{id}")
    InternalReturnObject<OrderItemRetVo> getOrderItemInfoById(@RequestParam @PathVariable("id") Long id);

    @PostMapping("/internal/shops/{shopId}/orders")
    InternalReturnObject createOrder(@PathVariable("shopId") Long shopId, @RequestBody OrderInfoVo vo);



}
